﻿@model CNav.Domain.Admin.DataValue

@{
    ViewBag.Title = "Data List - Create";
}

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    <div id="dataValue">
        <ol>
            
            <li>
                @Html.HiddenFor(model => model.DataSourceID)
                @Html.Label("Data List")
                @Html.DisplayFor(model => model.DataSourceName)
            </li>

            <li>
                @Html.LabelFor(model => model.Name)  @Html.EditorFor(model => model.Name)
                <br />
                @Html.ValidationMessageFor(model => model.Name)
            </li>

            <li>
                @Html.LabelFor(model => model.Value)

                @Html.EditorFor(model => model.Value)
                <br />
                @Html.ValidationMessageFor(model => model.Value)
            </li>

            <li>
                <label>&nbsp;</label>
                <input type="submit" value="Create" />
                <input type="button" value="Cancel" id="cancelButton" />
            </li>

        </ol>
    </div>
}
<script type="text/javascript">
    $(document).ready(function () {

        var cc = new CaseCentre();
        cc.BindCancel('#cancelButton', '@Url.Content("~/DataSource/Index")');
    });
</script>